<?php
/**
 * 算力矿机
 */
namespace app\api\model;
use app\common\model\MiningArithmetical as MiningArithmeticalModel;

class MiningArithmetical extends MiningArithmeticalModel
{
    /**
     * 记录算例矿机出售数量
     * @param $id 矿机ID
     * @return bool
     */
    public static function inventory_deduction($id){
        self::where('id',$id)->inc('quantity_sold')->update();
        return true;
    }
}